package structural.composite;

import java.util.List;

public abstract class AbstractEquip {
    protected String name;
    protected String brand;
    protected List<AbstractEquip> subEquipList;
    protected AbstractEquip(String n, String b){
        this.name = n;
        this.brand = b;
    }

    public final void print(){
        System.out.printf("正在打印设备，设备名称{ %s }， 设备品牌{ %s }。 \r\n", name, brand);
        printAdditional();
    }
    public abstract AbstractEquip addChild(AbstractEquip child);
    protected abstract void printAdditional();
}
